﻿<Window x:Class="NakedCrome.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="480" Width="480" Loaded="Window_Loaded">

    <Window.Resources>
        
        <Style TargetType="{x:Type TextBlock}">
            <Setter Property="Margin" Value="24, 12" />
            <Setter Property="FontSize" Value="14" />
        </Style>

        <Style TargetType="{x:Type CheckBox}">
            <Setter Property="Margin" Value="24, 12" />
            <Setter Property="FontSize" Value="14" />
        </Style>
        
        <Style TargetType="{x:Type Button}">
            <Setter Property="Margin" Value="10" />
            <Setter Property="Height" Value="32" />
            <Setter Property="MinWidth" Value="72" />
            <Setter Property="MaxWidth" Value="180" />
        </Style>
    </Window.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="72" />
            <RowDefinition Height="*" />
            <RowDefinition Height="64" />
        </Grid.RowDefinitions>

        <TextBlock Name="rectangleWorking"  Margin="0"
                   Grid.RowSpan="3"
                   Panel.ZIndex="100" Visibility="Hidden"
                   Background="Black" Foreground="White"
                   OpacityMask="#B4000000"
                   TextAlignment="Center">
            <LineBreak/>
            Google Chrome を初期状態で起動しています。<LineBreak/>
            起動中の Google Chrome を終了すると、<LineBreak/>
            通常のプロファイルへロールバックして<LineBreak/>
            本ソフトへ制御が戻ります。
        </TextBlock>
        
        <StackPanel Orientation="Horizontal" Grid.Row="0"  DataContext="{Binding FileVersionInfo}">
            <Image Source="pack://application:,,,/nakedchrome.ico" Height="48" Width="48" Margin="24,12,-6,12"></Image>
            <TextBlock Name="textBlockTitle" FontSize="24" Text="{Binding ProductName}" VerticalAlignment="Bottom"></TextBlock>
            <TextBlock Name="textBlockVersion" Text="{Binding ProductVersion}" VerticalAlignment="Bottom" HorizontalAlignment="Right"></TextBlock>
        </StackPanel>

        <Border Grid.Row="1" Margin="0" VerticalAlignment="Top" BorderThickness="1" SnapsToDevicePixels="True" Height="1"
            BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}">
        </Border>

        <StackPanel Grid.Row="1" Margin="0, 24">
            <TextBlock Name="textblockProcessState" />
            <CheckBox Name="checkBoxUseKill" Content="Kill を利用する (すべてのプロセスが強制終了します)" IsChecked="False" />
            <Button Name="buttonKillProcess" Content="プロセスを停止" Click="buttonKillProcess_Click" />
            
            <TextBlock Name="textblockProcessStarted" />
            <Button Name="buttonLaunchNakedChrome" Content="Naked Crome を起動する" Click="buttonLaunchNakedChrome_Click" />
        </StackPanel>

        <Border Grid.Row="2" Margin="0" VerticalAlignment="Top" BorderThickness="1" SnapsToDevicePixels="True" Height="1"
            BorderBrush="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}">
        </Border>
        
        <StackPanel Orientation="Horizontal" FlowDirection="RightToLeft" Grid.Row="2">
            
            <Button Name="buttonExit" Content="閉じる" Click="buttonExit_Click" />
            <Button Name="buttonLaunchGoogleChrome" Content="Google Chrome を通常起動" Click="buttonLaunchGoogleChrome_Click">
            </Button>
        </StackPanel>
    </Grid>
</Window>
